home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / comm / irc / AmirxRebol.lha / amirxrebol / rexx / currency.amirx < prev   
Encoding:
Text File  |  1998-10-24  |  2.3 KB  |  65 lines

  1. /**************************************************************************/
  2. /*                            Currency.amirx                              */
  3. /*                    Copyright ©1998 by Dick Whiting                     */
  4. /*                                                                        */
  5. /*------------------------------------------------------------------------*/
  6. /*                                                                        */
  7. /*  Calls the REBOL script for locating currency names and codes.         */
  8. /*  See the comments in currency.r for what arguments are expected.       */
  9. /*                                                                        */
  10. /*  Note that these are mainly just playing with REBOL (www.rebol.com)    */
  11. /*  REBOL, itself, is under constant development and there is little      */
  12. /*  guarantee that these will work with the next update.                  */
  13. /*                                                                        */
  14. /*                     This works with REBOL 1.0.2.1                      */
  15. /*------------------------------------------------------------------------*/
  16. /*                                                                        */
  17. /*               Address Bug Reports or Comments to:                      */
  18. /*                Dick Whiting <dwhiting@europa.com>                      */
  19. /*                           23 Oct 1998                                  */
  20. /*                                                                        */
  21. /*              Home Page: http://www.europa.com/~dwhiting/               */
  22. /*                                                                        */
  23. /**************************************************************************/
  24.  
  25. pragma('STACK',40000)
  26. pragma('D','REBOL:')
  27.  
  28. arg str
  29.  
  30. Address Command 'rebol --script AMIRC:/rebol/currency.r' str 'PIPE PIPE:/currency.pipe'
  31.  
  32. prefix='Currency'
  33. response=''
  34. found=0
  35.  
  36. open('IN','PIPE:currency.pipe','R')
  37.  
  38. do 100
  39.    response=readln('IN')
  40.    if response ='DONE' then break
  41.    if response~='' then do
  42.       parse var response "[" message "]"
  43.       response=message
  44.       cecho(response)
  45.       found=1
  46.    end
  47. end
  48.  
  49. close('IN')
  50.  
  51. if ~found then do
  52.    response="Currency lookup failed"
  53. end
  54. cecho(response)
  55.  
  56. exit
  57.  
  58.  
  59.  
  60. cecho:     /* This function echo's text to listview*/
  61.  
  62. "ECHO P="d2c(27)"b«"prefix"» " arg(1)
  63. return 0
  64.  
  65.